﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using MediSIIM.BizComponent.GuiZhouSASSYB;

namespace GuiZhouSASSYB
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        public void YBCall(GuiZhouSASSYBTradeParms callparam)
        {
            //callparam.ybjyhm = ApplyNo();
            var errormsg = string.Empty.PadRight(3000);
            int result = YiBaoJKDLL.YbCall(callparam.TradeId, callparam.ybjyhm, callparam.XmlIn, ref callparam.jyyzm, "100032", ref callparam.OutData);
            if (result < 0)
            {
                throw new Exception(callparam.OutData);
            }
            else
            {
                callparam.parseout();
            }
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            YiBaoJKDLL.YbInit("100032");
            var astr_jgxml = string.Empty.PadRight(1024);
            int aint_appcode = 0;
            var astr_appmsg = string.Empty.PadRight(1024);
            //YiBaoJKDLL.yh_interface_getuncertaintytrade("08", ref astr_jgxml, ref aint_appcode, ref astr_appmsg);
            YiBaoJKDLL.yh_interface_confirm("08", "        ", "100032117707", ref aint_appcode, ref astr_appmsg);
            MessageBox.Show(astr_jgxml.TrimEnd());
            MessageBox.Show(aint_appcode.ToString());
            MessageBox.Show(astr_appmsg.TrimEnd());
        }
    }
}
